<script setup lang='ts'>
import { ref } from "vue";
import { useRouter } from "vue-router";
const router = useRouter()
const num = ref(6)
const item = setInterval(()=>{
    num.value--
    if(num.value < 1) {
        clearInterval(item)
        router.push({name:'home',query:{isrouter:0}})
    }
},1000)
</script>

<template>
<div class="content">
    <div class="img">
        <img src="../../../public/6.png" alt="">
    </div>
    <h1>充值积分成功，等待<span style="color: red;">{{num}}</span>秒后回到页面</h1>
</div>
</template>

<style scoped>
.content{
    width: 100%;
    text-align: center;
}
h1{
    margin-top: 30px;
}
@media screen and (max-width:1024px) {
    h1{
    font-size: 20px;
}
}
</style>